﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RCloud.Data
{
    /// <summary>
    /// 更新电影
    /// </summary>
    public class MovieUpdateClass : Doo.DataClass.UpdateClass<REntities, Movie>
    {
        /// <summary>
        /// 电影ID
        /// </summary>
        public int ID { get; set; }

        public override Movie GetRecord(REntities container)
        {
            return container.Movie.FirstOrDefault(r => r.ID == ID);
        }

        public override Movie CreateRecord(REntities container)
        {
            var mg = new Movie { ID = ID };
            container.AddToMovie(mg);
            return mg;
        }
    }
}
